define(() => {
    return function (res, goods, tbody_cont) {
        let str = "";
        for (let i = 0; i < res.length; i++){
            for (let j = 0; j < goods.length; j++){
                if (res[i].proId === goods[j].id){
                    // console.log(res[i],goods[j].num);
                    str += `<tr id="${res[i].proId}">
                                <td class="single_choice">
                                    <label class="singleChoice_box">
                                        <input type="checkbox" class="s_check" name="goods" ${goods[j].check ? 'checked' : ''}>
                                        <div class="singleChoice-btn">
                                            <i class="iconfont tick" ${goods[j].check ? 'checked' : ''}></i>
                                        </div>
                                    </label>
                                </td>
                                <td class="col-img">
                                    <img src="${res[i].proImg}" alt="">
                                </td>
                                <td class="col-name">${res[i].name}</td>
                                <td class="col-price">
                                    <span class="singleGoods_price">${res[i].price}</span>
                                    <i>元</i>
                                </td>
                                <td class="col-num">
                                    <div class="change-goods-num">
                                        <a href="javascript:;" class="iconfont icon-reduce fl">&#xf018c;</a>
                                        <input type="text" autocomplete="off" value="${goods[j].num}" class="goods-num fl">
                                        <a href="javascript:;" class="iconfont icon-plus fr">&#xf0050;</a>
                                    </div>
                                </td>
                                <td class="col-total">
                                    <span>${res[i].price * goods[j].num}</span>
                                    <i>元</i>
                                </td>
                                <td class="col-action">
                                    <a href="javascript:;" class="del">
                                        <i class="iconfont">&#xe63a;</i>
                                    </a>
                                </td>
                            </tr>`
                }
            }
        }
        tbody_cont.html(str);
    }
})